package com.niit.onlinemusic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.niit.onlinemusic.common.R;
import com.niit.onlinemusic.mapper.CommentMapper;
import com.niit.onlinemusic.model.domain.Comment;
import com.niit.onlinemusic.service.CommentService;
import org.springframework.stereotype.Service;

/**
 * 评论服务实现类
 *
 * @author zuwei522
 * @since 2025/9/27 23:31
 */
@Service
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements CommentService {

    private final CommentMapper commentMapper;

    public CommentServiceImpl(CommentMapper commentMapper) {
        this.commentMapper = commentMapper;
    }

    @Override
    public R getCommentBySongListId(Integer songListId) {
        return R.success("查询成功", commentMapper.selectCommentListBySongListId(songListId));
    }

}
